<template>
  <div class="a-shop">
    <ShopHeader :shopInfo="shopInfo" />
    <DishList :dishes="dishes" @dish-click="handleDishClick" />
    <Reviews :reviews="reviews" />
  </div>
</template>

<script>
import ShopHeader from '@/components/shop/ShopHeader'
import DishList from '@/components/shop/DishList'
import Reviews from '@/components/shop/Reviews'

export default {
  components: { ShopHeader, DishList, Reviews },
  data() {
    return {
      shopInfo: {
        name: 'B店铺',
        description: '这是B店铺的详细介绍...',
        rating: 4.7,
        monthlySales: 200,
        minOrder: 30,
        deliveryFee: 7,
        deliveryTime: 35,
        coverImage: require('@/assets/shop-cover.jpg'),
      },
      dishes: [
        {
          id: 1,
          name: '菜品3',
          price: 25,
          image: require('@/assets/dishes/dish3.jpg'),
          description: '这是菜品1的简介'
        },
        {
          id: 2,
          name: '菜品4',
          price: 30,
          image: require('@/assets/dishes/dish4.jpg'),
          description: '这是菜品2的简介'
        }
      ],
      reviews: [
        // 评论数据
        {
          id: 3,
          username: '顾客王五',
          rating: 3,
          content: '一般般，没有特别惊艳',
          time: '2023-06-05'
        },
        {
          id: 4,
          username: '顾客黄伟佳',
          rating: 1,
          content: '做得好差',
          time: '2025-04-01'
        }
      ]
    }
  },
  methods: {
    handleDishClick(dishId) {
      this.$router.push(`/ashop/dish/${dishId}`)
    }
  }
}
</script>
